<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<div class="portlet box green">
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-gift"></i>医疗订单
        </div>
    </div>
    <div class="portlet-body form">
        <form id="ordersForm" class="form-horizontal form-bordered" action="/orders/save" method="post">
            <div class="form-group">
                <label class="col-md-3 control-label">预约用户id:</label>
                <div class="col-md-4">
                    <input type="text" name="patientId" class="form-control" value="${orders.patientId}"
                           maxlength="32"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-3 control-label">患者姓名:</label>
                <div class="col-md-4">
                    <input type="text" name="patientName" class="form-control" value="${orders.patientName}"
                           maxlength="200"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-3 control-label">性别:</label>
                <div class="col-md-4">
                    <div class="radio-list">
                        <label class="radio-inline">
                            <input type="radio" name="patientSex" value="1" <c:if test="${orders.patientSex == 1}">checked</c:if>> 男 </label>
                        <label class="radio-inline">
                            <input type="radio" name="patientSex" value="0" <c:if test="${orders.patientSex == 0}">checked</c:if>> 女 </label>
                        <label class="radio-inline">
                            <input type="radio" name="patientSex" value="2" <c:if test="${orders.patientSex != 0 && orders.patientSex != 1}">checked</c:if>> 保密 </label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-3 control-label">年龄:</label>
                <div class="col-md-4">
                    <input type="number" name="patientAge" class="form-control" value="${orders.patientAge}"
                           maxlength="10"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-3 control-label">手机号:</label>
                <div class="col-md-4">
                    <input type="text" name="patientPhone" class="form-control" value="${orders.patientPhone}"
                           maxlength="50"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-3 control-label">病情描述:</label>
                <div class="col-md-4">
                    <div class="input-icon right">
                        <i class="fa"></i>
                        <textarea rows="5" class="form-control" name="conditionDescription">${orders.conditionDescription}</textarea>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-3 control-label">医院id:</label>
                <div class="col-md-4">
                    <input type="text" name="hospitalId" class="form-control" value="${orders.hospitalId}"
                           maxlength="32"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-3 control-label">科室id:</label>
                <div class="col-md-4">
                    <input type="text" name="departmentId" class="form-control" value="${orders.departmentId}"
                           maxlength="32"/>
                </div>
            </div>
            <div class="form-actions">
                <div class="col-md-9 col-md-offset-3">
                    <button type="button" class="btn btn-primary" onclick="save(this)">
                        <spring:message code="btn.save"></spring:message>
                    </button>
                    <button type="reset" class="btn btn-default" onclick="cancel()">
                        <spring:message code="btn.return"></spring:message>
                    </button>
                </div>
            </div>
            <input type="hidden" name="id" value="${orders.id}">
        </form>
    </div>
</div>
<script type="text/javascript" src="<c:url value="/static/custom/datepicker-util.js"></c:url>"></script>
<script type="text/javascript">
    $(function () {
        $('#ordersForm').validate();
    });
</script>